package a.f.h.e;

import a.c.e;
import a.c.*;
import a.d.s;
import a.f.j.cb;
import a.i.db;

import java.awt.*;
import java.util.Comparator;

public class a
  implements a.f.h.b.d
{
  public static final String b = "y.layout.orthogonal.ring.FixedSizeNodeSplitter#NODE_SIZE";
  public static final short c = 2;
  public static final short d = 3;
  private a.f.o e;
  private a.f.j.ab f;
  private a.f.o g;
  private cb h;
  private short i;
  private int j;
  private x k;
  private a.c.n l;
  private a.c.n m;
  private a.c.n n;
  private int o = 4;
  private static final int p = 0;
  private static final int q = 1;
  private static final int r = 2;
  private static final int s = 3;
  private x t;
  public static int u;
  public static boolean v;
  
  public void a(cb paramcb)
  {
    this.e = ((a.f.o)paramcb.a());
    this.f = paramcb;
  }
  
  public void a(short paramShort)
  {
    this.i = paramShort;
  }
  
  public void a(int paramInt)
  {
    this.j = paramInt;
  }
  
  public cb b()
  {
    return this.h;
  }
  
  public void a()
  {
    boolean bool = v;
    int i1 = u;
    a.f.j.n localn = this.f.c();
    a.c.d locald1 = localn.a().a();
    this.g = new a.f.q();
    this.h = new cb(this.g);
    this.k = db.a(new Object[this.e.j()]);
    this.l = db.b(new Object[this.e.l()]);
    Object localObject1 = this.e.v();
    Object localObject3;
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      if (bool) {
        break label236;
      }
      localObject2 = ((a.c.w)localObject1).d();
      if (i1 != 0) {
        break label229;
      }
      if (!bool)
      {
        if (((e)localObject2).e() <= this.o)
        {
          localObject3 = this.g.i();
          this.k.a(localObject2, localObject3);
        }
        ((a.c.w)localObject1).f();
      }
    } while (i1 == 0);
    this.m = db.b(new Object[this.e.l()]);
    this.n = db.b(new Object[this.e.l()]);
    if (!bool) {
      a(this.m, this.n);
    }
    label229:
    label236:
    a.c.w localw = this.e.v();
    Object localObject4;
    Object localObject5;
    Object localObject6;
    Object localObject7;
    label463:
    do
    {
      do
      {
        if (!localw.e()) {
          break;
        }
        localObject1 = localw.d();
        if ((bool) || (((e)localObject1).e() != 0))
        {
          localm = ((e)localObject1).n();
          localObject2 = localm.a();
          localObject3 = (e)this.m.get(localObject2);
          localm.b();
          do
          {
            if (!localm.e()) {
              break label463;
            }
            localObject4 = localm.a();
            localObject5 = (e)this.m.get(localObject4);
            localObject6 = (e)this.n.get(localObject4);
            localObject7 = a((e)localObject3, (e)localObject5);
            if (i1 != 0) {
              break;
            }
            if (((e)localObject1).e() > this.o) {
              this.k.a(localObject1, localObject7);
            }
            localObject3 = (e)this.m.get(localObject4);
            a.c.d locald2 = this.g.a((e)localObject5, (e)localObject6);
            this.l.a(localObject4, locald2);
            if (!bool)
            {
              if (localObject4 == localObject2) {
                break label463;
              }
              localm.b();
            }
          } while (i1 == 0);
        }
        localw.f();
      } while (bool);
    } while (i1 == 0);
    m localm = this.e.w();
    label578:
    label584:
    do
    {
      if (!localm.e()) {
        break;
      }
      localObject1 = localm.a();
      if (i1 != 0) {
        break label636;
      }
      if (!bool)
      {
        if (this.f.h((a.c.d)localObject1))
        {
          if (bool) {
            break label584;
          }
          this.h.g((a.c.d)this.l.get(localObject1));
        }
      }
      else {
        if (i1 == 0) {
          break label578;
        }
      }
      this.h.o((a.c.d)this.l.get(localObject1));
      localObject2 = this.f.b((a.c.d)localObject1);
      this.h.a((a.c.d)this.l.get(localObject1), (a.c.d)this.l.get(localObject2));
      localm.f();
    } while (i1 == 0);
    label636:
    localObject1 = this.h.g();
    this.g.a("y.layout.orthogonal.general.NodeSplitter.NODE_FACES", (k)localObject1);
    Object localObject2 = this.h.g();
    this.g.a("y.layout.orthogonal.ring.FixedSizeNodeSplitter#NODE_SIZE", (k)localObject2);
    this.t = this.h.a().B();
    this.g.a("y.layout.orthogonal.ring.FixedSizeNodeSplitter#NODE_SIZE", new c_((a.f.j.p)localObject2, this.t));
    try
    {
      this.h.f();
      localObject3 = (a.c.d)this.l.get(locald1);
      this.h.a(this.h.c((a.c.d)localObject3));
      localObject4 = this.h.b();
      do
      {
        if (!((a.f.j.o)localObject4).e()) {
          break;
        }
        ((a.f.j.p)localObject1).a(((a.f.j.o)localObject4).a(), false);
        if (bool) {
          break label1096;
        }
        ((a.f.j.o)localObject4).f();
        if (i1 != 0) {
          break label1089;
        }
      } while (i1 == 0);
      if (!bool)
      {
        localObject4 = this.e.v();
        label974:
        do
        {
          if (!((a.c.w)localObject4).e()) {
            break;
          }
          localObject5 = ((a.c.w)localObject4).d();
          if (!bool)
          {
            if (i1 != 0) {
              break label1089;
            }
            if (bool) {}
          }
          else
          {
            if (((e)localObject5).e() <= this.o) {
              break label974;
            }
          }
          localObject6 = (a.c.d)this.k.get(localObject5);
          localObject7 = this.h.c((a.c.d)localObject6);
          this.k.a(localObject5, localObject7);
          ((a.f.j.p)localObject1).a((a.f.j.n)localObject7, true);
          double d1 = this.e.s((e)localObject5);
          double d2 = this.e.t((e)localObject5);
          Dimension localDimension = new Dimension((int)d1, (int)d2);
          ((a.f.j.p)localObject2).a((a.f.j.n)localObject7, localDimension);
          if (!bool)
          {
            if (i1 != 0)
            {
              localObject6 = this.e.u((e)localObject5);
              if (!bool) {
                if (((s)localObject6).a <= 0.0D)
                {
                  if (bool) {
                    continue;
                  }
                  if (((s)localObject6).b <= 0.0D) {
                    break label1051;
                  }
                }
              }
              localObject7 = (e)this.k.get(localObject5);
              this.t.a(localObject7, this.e.u((e)localObject5));
            }
            ((a.c.w)localObject4).f();
          }
        } while (i1 == 0);
        label1051:
        if (!bool) {}
      }
      localo = this.h.b();
    }
    catch (Exception localException)
    {
      System.err.println("Internal Error in Face calculation !");
      localException.printStackTrace(System.err);
    }
    label1089:
    label1096:
    do
    {
      a.f.j.o localo;
      do
      {
        if (!localo.e()) {
          return;
        }
        localObject4 = (a.f.j.n)localo.j();
        if (((a.f.j.p)localObject1).getBool(localObject4))
        {
          localObject5 = ((a.f.j.n)localObject4).a();
          do
          {
            if (!((m)localObject5).e()) {
              break;
            }
            localObject6 = ((m)localObject5).a();
            this.h.g(this.h.b((a.c.d)localObject6));
            this.h.o((a.c.d)localObject6);
            ((m)localObject5).f();
            if (bool) {
              break label1219;
            }
            if (i1 != 0) {
              break label1217;
            }
          } while (i1 == 0);
        }
      } while (bool);
      localo.f();
    } while (i1 == 0);
    label1217:
    label1219:
    return;
  }
  
  private a.c.d a(e parame1, e parame2)
  {
    boolean bool = v;
    if (parame1.equals(parame2)) {
      return null;
    }
    a.c.d locald1 = this.g.a(parame1, parame2);
    m localm = parame2.n();
    a.c.d locald2;
    if (!bool)
    {
      if (!localm.e())
      {
        locald2 = this.g.a(parame2, parame1);
        if (bool) {
          break label110;
        }
        if (u == 0) {}
      }
      else
      {
        localm.f();
      }
    }
    else
    {
      a.c.d locald3 = localm.a();
      locald2 = this.g.a(parame2, locald3, parame1, null, 1, 0);
    }
    this.h.a(locald1, locald2);
    label110:
    return locald2;
  }
  
  private void a(a.c.n paramn1, a.c.n paramn2)
  {
    boolean bool = v;
    int i1 = u;
    Object localObject1 = this.e.v();
    Object localObject2;
    Object localObject3;
    label117:
    label119:
    do
    {
      do
      {
        if (!((a.c.w)localObject1).e()) {
          break label122;
        }
        localObject2 = ((a.c.w)localObject1).d();
        if (i1 != 0) {
          break label129;
        }
        localObject3 = ((e)localObject2).n();
        do
        {
          if (!((m)localObject3).e()) {
            break;
          }
          a.c.d locald = ((m)localObject3).a();
          e locale = a(locald);
          paramn1.a(locald, locale);
          ((m)localObject3).f();
          if (bool) {
            break label119;
          }
          if (i1 != 0) {
            break label117;
          }
        } while (i1 == 0);
      } while (bool);
      ((a.c.w)localObject1).f();
    } while (i1 == 0);
    label122:
    localObject1 = this.e.w();
    label129:
    do
    {
      if (!((m)localObject1).e()) {
        break;
      }
      localObject2 = ((m)localObject1).a();
      localObject3 = this.f.b((a.c.d)localObject2);
      paramn2.a(localObject2, paramn1.get(localObject3));
      paramn2.a(localObject3, paramn1.get(localObject2));
      ((m)localObject1).f();
    } while (i1 == 0);
  }
  
  private e a(a.c.d paramd)
  {
    boolean bool = v;
    if (!bool) {
      if (paramd.e().e() <= this.o)
      {
        locale = (e)this.k.get(paramd.e());
        if (bool) {
          break label57;
        }
        if (u == 0) {
          return locale;
        }
      }
    }
    e locale = this.g.i();
    label57:
    return locale;
    return locale;
  }
  
  public void c()
  {
    boolean bool = v;
    int i11 = u;
    Object localObject1 = this.g.v();
    if (((a.c.w)localObject1).e()) {}
    while (bool)
    {
      localObject2 = this.g.o(((a.c.w)localObject1).d());
      this.g.b(((a.c.w)localObject1).d(), 10.0D, 10.0D);
      if (!bool)
      {
        if (i11 != 0) {
          break label104;
        }
        this.g.a(((a.c.w)localObject1).d(), (a.d.w)localObject2);
        ((a.c.w)localObject1).f();
      }
      if (i11 == 0) {
        break;
      }
    }
    label104:
    localObject1 = this.e.B();
    Object localObject2 = this.e.v();
    Object localObject3;
    label288:
    label290:
    do
    {
      do
      {
        if (!((a.c.w)localObject2).e()) {
          break;
        }
        localObject3 = ((a.c.w)localObject2).d();
        z localz1 = new z();
        if (i11 != 0) {
          break label1019;
        }
        if (((e)localObject3).e() > this.o)
        {
          localObject5 = (a.f.j.n)this.k.get(localObject3);
          m localm1 = ((a.f.j.n)localObject5).a();
          do
          {
            if (!localm1.e()) {
              break;
            }
            a.c.d locald1 = localm1.a();
            localz1.add(this.g.o(locald1.e()));
            localm1.f();
            if (bool) {
              break label290;
            }
            if (i11 != 0) {
              break label288;
            }
          } while (i11 == 0);
        }
        Object localObject5 = (e)this.k.get(localObject3);
        if (!bool)
        {
          localz1.add(this.g.o((e)localObject5));
          ((x)localObject1).a(localObject3, localz1);
          ((a.c.w)localObject2).f();
        }
      } while (i11 == 0);
    } while (bool);
    localObject2 = this.e.v();
    Object localObject7;
    label515:
    label516:
    Object localObject8;
    Object localObject11;
    Object localObject12;
    label789:
    label921:
    int i10;
    label991:
    do
    {
      if (!((a.c.w)localObject2).e()) {
        break;
      }
      localObject3 = ((a.c.w)localObject2).d();
      int i1 = 2147483647;
      int i2 = -2147483648;
      int i3 = 2147483647;
      int i4 = -2147483648;
      localObject7 = (z)((x)localObject1).get(localObject3);
      if (bool) {
        break label1018;
      }
      if (i11 != 0) {
        break label1014;
      }
      y localy = ((z)localObject7).h();
      if (localy.e()) {}
      while (bool)
      {
        a.d.w localw2 = (a.d.w)localy.j();
        if (bool) {
          break label516;
        }
        if (i11 != 0) {
          break label515;
        }
        if (localw2.a() < i1) {
          i1 = (int)localw2.a();
        }
        if (!bool) {
          if (localw2.b() < i3) {
            i3 = (int)localw2.b();
          }
        }
        if (!bool) {
          if (localw2.a() > i2) {
            i2 = (int)localw2.a();
          }
        }
        if (!bool)
        {
          if (localw2.b() > i4) {
            i4 = (int)localw2.b();
          }
          localy.f();
        }
        if (i11 == 0) {
          break;
        }
      }
      if (!bool)
      {
        if (this.i != 3) {
          if (bool) {
            continue;
          }
        }
      }
      else {
        if (this.i != 2) {
          break label991;
        }
      }
      double d3 = this.e.s((e)localObject3);
      double d5 = this.e.t((e)localObject3);
      s locals = this.e.u((e)localObject3);
      localObject8 = new z();
      z localz3 = new z();
      z localz4 = new z();
      localObject11 = new z();
      if ((bool) || (((e)localObject3).e() > this.o))
      {
        localObject12 = (a.f.j.n)this.k.get(localObject3);
        m localm3 = ((a.f.j.n)localObject12).a();
        do
        {
          if (!localm3.e()) {
            break;
          }
          a.c.d locald3 = localm3.a();
          a.d.w localw4 = this.g.o(locald3.e());
          if (i11 != 0) {
            break label921;
          }
          if (localw4.a() >= i1)
          {
            if (bool) {
              break label789;
            }
            if (localw4.a() <= i2)
            {
              if (!bool) {
                if (localw4.b() == i3) {
                  ((z)localObject8).add(new Integer((int)localw4.a()));
                }
              }
              if (bool) {
                break label789;
              }
              if (localw4.b() == i4) {
                localz3.add(new Integer((int)localw4.a()));
              }
            }
          }
          if (!bool)
          {
            if (localw4.b() >= i3)
            {
              if (bool) {
                continue;
              }
              if (localw4.b() <= i4)
              {
                if (!bool) {
                  if (localw4.a() == i1) {
                    localz4.add(new Integer((int)localw4.b()));
                  }
                }
                if (bool) {
                  continue;
                }
                if (localw4.a() == i2) {
                  ((z)localObject11).add(new Integer((int)localw4.b()));
                }
              }
            }
            localm3.f();
          }
        } while (i11 == 0);
        if (bool) {
          break label1003;
        }
        int i9 = a((z)localObject8, localz3, i1, i2, (int)locals.a);
        i10 = a(localz4, (z)localObject11, i3, i4, (int)locals.b);
        this.e.a((e)localObject3, i9, i10);
        if (bool) {
          continue;
        }
        if (i11 == 0) {}
      }
      else
      {
        this.e.a((e)localObject3, (i1 + i2) / 2, (i3 + i4) / 2);
      }
      ((a.c.w)localObject2).f();
    } while (i11 == 0);
    label1003:
    if (!bool)
    {
      this.h.o();
      label1014:
      label1018:
      label1019:
      Object localObject4;
      Object localObject6;
      if (this.i == 2)
      {
        localObject2 = new Rectangle2D.Double();
        localObject3 = this.e.w();
        while (((m)localObject3).e())
        {
          localObject4 = ((m)localObject3).a();
          localObject6 = ((a.c.d)localObject4).e();
          z localz2 = this.g.m((a.c.d)this.l.get(localObject4));
          if ((bool) || ((!bool) && (i11 != 0))) {
            break label4179;
          }
          a.d.w localw1;
          if (!bool)
          {
            if (((e)localObject6).e() > this.o)
            {
              localw1 = this.g.o((e)this.m.get(localObject4));
              ((Rectangle2D.Double)localObject2).setFrame(this.e.p((e)localObject6) - 1.0D, this.e.q((e)localObject6) - 1.0D, this.e.s((e)localObject6) + 2.0D, this.e.t((e)localObject6) + 2.0D);
              if (!((Rectangle2D.Double)localObject2).contains(localw1.a, localw1.b))
              {
                localObject7 = this.e.r((a.c.d)localObject4);
                if (bool) {
                  break label1304;
                }
                if (((a.d.w)localObject7).a() != localw1.a())
                {
                  if (bool) {
                    break label1304;
                  }
                  if (((a.d.w)localObject7).b() != localw1.b())
                  {
                    localz2.a(localw1);
                    if (bool) {
                      break label1304;
                    }
                    if (i11 == 0) {}
                  }
                }
              }
              else
              {
                this.e.c((a.c.d)localObject4, localw1);
              }
            }
            localObject6 = ((a.c.d)localObject4).f();
            if (bool) {
              break label1498;
            }
          }
          if (((e)localObject6).e() > this.o)
          {
            localw1 = this.g.o((e)this.n.get(localObject4));
            ((Rectangle2D.Double)localObject2).setFrame(this.e.p((e)localObject6) - 1.0D, this.e.q((e)localObject6) - 1.0D, this.e.s((e)localObject6) + 2.0D, this.e.t((e)localObject6) + 2.0D);
            if (!((Rectangle2D.Double)localObject2).contains(localw1.a, localw1.b))
            {
              localObject7 = this.e.s((a.c.d)localObject4);
              if (bool) {
                break label1498;
              }
              if (((a.d.w)localObject7).a() != localw1.a()) {
                if (!bool)
                {
                  if (((a.d.w)localObject7).b() != localw1.b())
                  {
                    localz2.b(localw1);
                    if (bool) {
                      break label1498;
                    }
                  }
                }
                else if (i11 == 0) {}
              }
            }
            else
            {
              this.e.d((a.c.d)localObject4, localw1);
            }
          }
          this.e.b((a.c.d)localObject4, localz2);
          ((m)localObject3).f();
        }
      }
      if (!bool) {
        if (this.i == 3)
        {
          localObject2 = new Rectangle2D.Double();
          localObject3 = this.e.w();
          do
          {
            if (!((m)localObject3).e()) {
              break;
            }
            localObject4 = ((m)localObject3).a();
            localObject6 = this.g.o((a.c.d)this.l.get(localObject4));
            if (i11 != 0) {
              break label4180;
            }
            if (!bool)
            {
              if (!this.f.h((a.c.d)localObject4)) {
                a((a.c.d)localObject4, (z)localObject6);
              }
              ((m)localObject3).f();
            }
          } while (i11 == 0);
          localObject3 = new b_();
          ((b_)localObject3).a = this.e;
          if (bool) {
            break label4193;
          }
          localObject4 = this.e.v();
          label2924:
          label3954:
          label3964:
          do
          {
            do
            {
              if (!((a.c.w)localObject4).e()) {
                break label4166;
              }
              double d1;
              double d2;
              double d4;
              double d6;
              do
              {
                localObject6 = ((a.c.w)localObject4).d();
                d1 = this.e.p((e)localObject6);
                d2 = this.e.q((e)localObject6);
                d4 = d1 + this.e.s((e)localObject6);
                d6 = d2 + this.e.t((e)localObject6);
                if ((!bool) && (i11 != 0)) {
                  break label4179;
                }
                if ((!bool) && (((e)localObject6).e() <= this.o)) {
                  break label4149;
                }
                localObject8 = new a.c.ab[4][3];
                int i5 = 0;
                do
                {
                  if (i5 >= localObject8.length) {
                    break;
                  }
                  if (bool) {
                    break label2149;
                  }
                  if (i11 != 0) {
                    break label2146;
                  }
                  int i7 = 0;
                  if (i7 < localObject8[i5].length)
                  {
                    localObject8[i5][i7] = new a.c.ab();
                    i7++;
                  }
                  for (;;)
                  {
                    if (!bool) {
                      if (i11 == 0)
                      {
                        if (i11 == 0) {
                          break;
                        }
                        if (bool) {
                          continue;
                        }
                        i5++;
                      }
                    }
                  }
                } while (i11 == 0);
              } while (bool);
              Object localObject10;
              do
              {
                localm2 = ((e)localObject6).n();
                break label2248;
                Object localObject13;
                do
                {
                  m localm2;
                  if (!localm2.e()) {
                    break;
                  }
                  a.c.d locald2 = localm2.a();
                  localObject11 = this.e.o(locald2);
                  localObject12 = (a.d.w)((z)localObject11).b();
                  localObject13 = (a.d.w)((z)localObject11).b();
                  if (i11 != 0) {
                    break label2142;
                  }
                  if (Math.abs(((a.d.w)localObject12).a - ((a.d.w)localObject13).a) < 0.1D)
                  {
                    if (!bool) {}
                    if (!bool) {}
                    i10 = ((a.d.w)localObject12).a > d4 ? 2 : ((a.d.w)localObject12).a < d1 ? 0 : 1;
                    if (!bool)
                    {
                      if (((a.d.w)localObject12).b > ((a.d.w)localObject13).b)
                      {
                        localObject8[0][i10].add(locald2);
                        if (bool) {
                          continue;
                        }
                        if (i11 == 0) {}
                      }
                      else
                      {
                        localObject8[2][i10].add(locald2);
                      }
                    }
                    else
                    {
                      if (bool) {
                        continue;
                      }
                      if (i11 == 0) {}
                    }
                  }
                  else
                  {
                    if (!bool) {}
                    if (!bool) {}
                    i10 = ((a.d.w)localObject12).b > d6 ? 2 : ((a.d.w)localObject12).b < d2 ? 0 : 1;
                    if (!bool) {
                      if (((a.d.w)localObject12).a > ((a.d.w)localObject13).a)
                      {
                        localObject8[1][i10].add(locald2);
                        if (bool) {
                          continue;
                        }
                        if (i11 == 0) {
                          break label2124;
                        }
                      }
                    }
                    localObject8[3][i10].add(locald2);
                  }
                  localm2.f();
                } while (i11 == 0);
                if (bool) {
                  break;
                }
                int i6 = 0;
                do
                {
                  if ((!bool) && (i6 >= localObject8.length)) {
                    break;
                  }
                  if (i11 != 0) {
                    break label2231;
                  }
                  int i8 = 0;
                  if (i8 < localObject8[i6].length)
                  {
                    ((b_)localObject3).c = i6;
                    localObject8[i6][i8].a((Comparator)localObject3);
                    i8++;
                  }
                  for (;;)
                  {
                    if (!bool) {
                      if (i11 == 0)
                      {
                        if (i11 == 0) {
                          break;
                        }
                        if (bool) {
                          continue;
                        }
                        i6++;
                      }
                    }
                  }
                } while (i11 == 0);
                if (!bool) {
                  i6 = 0;
                }
                do
                {
                  if (i6 >= localObject8.length) {
                    break label2488;
                  }
                  localObject10 = localObject8[i6][1];
                  if (i11 != 0) {
                    break;
                  }
                  localObject11 = localObject10.l();
                  do
                  {
                    do
                    {
                      if (!((m)localObject11).e()) {
                        break label2475;
                      }
                      localObject12 = ((m)localObject11).a();
                      localObject13 = this.e.o((a.c.d)localObject12);
                      a.d.w localw3 = (a.d.w)((z)localObject13).b();
                      if (i11 != 0) {
                        break;
                      }
                      if (i6 == 0)
                      {
                        ((z)localObject13).c(new a.d.w(localw3.a, d2));
                        if (bool) {
                          continue;
                        }
                        if (i11 == 0) {}
                      }
                      else
                      {
                        if (!bool) {
                          if (i6 == 1)
                          {
                            ((z)localObject13).c(new a.d.w(d1, localw3.b));
                            if (bool) {
                              continue;
                            }
                            if (i11 == 0) {
                              break label2455;
                            }
                          }
                        }
                        if (!bool)
                        {
                          if (i6 == 2)
                          {
                            ((z)localObject13).c(new a.d.w(localw3.a, d6));
                            if (bool) {
                              continue;
                            }
                            if (i11 == 0) {}
                          }
                          else
                          {
                            if (bool) {
                              continue;
                            }
                          }
                        }
                        else if (i6 == 3) {
                          ((z)localObject13).c(new a.d.w(d4, localw3.b));
                        }
                      }
                      a((a.c.d)localObject12, (z)localObject13);
                      ((m)localObject11).f();
                    } while (i11 == 0);
                    i6++;
                  } while (bool);
                } while (i11 == 0);
              } while (bool);
              Object localObject9 = localObject8[0][0];
              double d7;
              double d8;
              double d9;
              a.c.d locald4;
              z localz5;
              a.d.w localw5;
              if (!bool)
              {
                if (!localObject9.isEmpty())
                {
                  localObject10 = localObject8[1][1];
                  d7 = d6 - d2;
                  if (!localObject10.isEmpty()) {
                    d7 = this.e.r(localObject10.n()).b - d2;
                  }
                  d8 = d7 / localObject9.size();
                  d9 = d2 + d7 - 0.5D * d8;
                  do
                  {
                    if (localObject9.isEmpty()) {
                      break;
                    }
                    locald4 = localObject9.o();
                    localz5 = this.e.o(locald4);
                    localw5 = (a.d.w)localz5.b();
                    localz5.c(new a.d.w(localw5.a, d9));
                    localz5.c(new a.d.w(d1, d9));
                    a(locald4, localz5);
                    localObject10.b(locald4);
                    d9 -= d8;
                    if (bool) {
                      break label2716;
                    }
                    if (i11 != 0) {
                      break label2706;
                    }
                  } while (i11 == 0);
                }
                if (bool) {}
              }
              else
              {
                localObject9 = localObject8[0][2];
              }
              if (!bool)
              {
                if (!localObject9.isEmpty())
                {
                  localObject10 = localObject8[3][1];
                  d7 = d6 - d2;
                  if (!localObject10.isEmpty()) {
                    d7 = this.e.r(localObject10.m()).b - d2;
                  }
                  d8 = d7 / localObject9.size();
                  d9 = d2 + d7 - 0.5D * d8;
                  do
                  {
                    if (localObject9.isEmpty()) {
                      break;
                    }
                    locald4 = (a.c.d)localObject9.e();
                    localz5 = this.e.o(locald4);
                    localw5 = (a.d.w)localz5.b();
                    localz5.c(new a.d.w(localw5.a, d9));
                    localz5.c(new a.d.w(d4, d9));
                    a(locald4, localz5);
                    localObject10.a(locald4);
                    d9 -= d8;
                    if (bool) {
                      break label2924;
                    }
                    if (i11 != 0) {
                      break label2914;
                    }
                  } while (i11 == 0);
                }
                if (bool) {}
              }
              else
              {
                localObject9 = localObject8[1][0];
              }
              if (!bool)
              {
                if (!localObject9.isEmpty())
                {
                  localObject10 = localObject8[0][1];
                  d7 = d4 - d1;
                  if (!localObject10.isEmpty()) {
                    d7 = this.e.r(localObject10.m()).a - d1;
                  }
                  d8 = d7 / localObject9.size();
                  d9 = d1 + d7 - 0.5D * d8;
                  do
                  {
                    if (localObject9.isEmpty()) {
                      break;
                    }
                    locald4 = (a.c.d)localObject9.e();
                    localz5 = this.e.o(locald4);
                    localw5 = (a.d.w)localz5.b();
                    localz5.c(new a.d.w(d9, localw5.b));
                    localz5.c(new a.d.w(d9, d2));
                    a(locald4, localz5);
                    localObject10.a(locald4);
                    d9 -= d8;
                    if (bool) {
                      break label3132;
                    }
                    if (i11 != 0) {
                      break label3122;
                    }
                  } while (i11 == 0);
                }
                if (bool) {}
              }
              else
              {
                localObject9 = localObject8[1][2];
              }
              if (!bool)
              {
                if (!localObject9.isEmpty())
                {
                  localObject10 = localObject8[2][1];
                  d7 = d4 - d1;
                  if (!localObject10.isEmpty()) {
                    d7 = this.e.r(localObject10.n()).a - d1;
                  }
                  d8 = d7 / localObject9.size();
                  d9 = d1 + d7 - 0.5D * d8;
                  do
                  {
                    if (localObject9.isEmpty()) {
                      break;
                    }
                    locald4 = (a.c.d)localObject9.b();
                    localz5 = this.e.o(locald4);
                    localw5 = (a.d.w)localz5.b();
                    localz5.c(new a.d.w(d9, localw5.b));
                    localz5.c(new a.d.w(d9, d6));
                    a(locald4, localz5);
                    localObject10.b(locald4);
                    d9 -= d8;
                    if (bool) {
                      break label3340;
                    }
                    if (i11 != 0) {
                      break label3330;
                    }
                  } while (i11 == 0);
                }
                if (bool) {}
              }
              else
              {
                localObject9 = localObject8[3][0];
              }
              if (!bool)
              {
                if (!localObject9.isEmpty())
                {
                  localObject10 = localObject8[0][1];
                  d7 = d4 - d1;
                  if (!localObject10.isEmpty()) {
                    d7 = d4 - this.e.r(localObject10.n()).a;
                  }
                  d8 = d7 / localObject9.size();
                  d9 = d4 - d7 + 0.5D * d8;
                  do
                  {
                    if (localObject9.isEmpty()) {
                      break;
                    }
                    locald4 = (a.c.d)localObject9.b();
                    localz5 = this.e.o(locald4);
                    localw5 = (a.d.w)localz5.b();
                    localz5.c(new a.d.w(d9, localw5.b));
                    localz5.c(new a.d.w(d9, d2));
                    a(locald4, localz5);
                    localObject10.b(locald4);
                    d9 += d8;
                    if (bool) {
                      break label3548;
                    }
                    if (i11 != 0) {
                      break label3538;
                    }
                  } while (i11 == 0);
                }
                if (bool) {}
              }
              else
              {
                localObject9 = localObject8[3][2];
              }
              if (!bool)
              {
                if (!localObject9.isEmpty())
                {
                  localObject10 = localObject8[2][1];
                  d7 = d4 - d1;
                  if (!localObject10.isEmpty()) {
                    d7 = d4 - this.e.r(localObject10.m()).a;
                  }
                  d8 = d7 / localObject9.size();
                  d9 = d4 - d7 + 0.5D * d8;
                  do
                  {
                    if (localObject9.isEmpty()) {
                      break;
                    }
                    locald4 = (a.c.d)localObject9.e();
                    localz5 = this.e.o(locald4);
                    localw5 = (a.d.w)localz5.b();
                    localz5.c(new a.d.w(d9, localw5.b));
                    localz5.c(new a.d.w(d9, d6));
                    a(locald4, localz5);
                    localObject10.b(locald4);
                    d9 += d8;
                    if (bool) {
                      break label3756;
                    }
                    if (i11 != 0) {
                      break label3746;
                    }
                  } while (i11 == 0);
                }
                if (bool) {}
              }
              else
              {
                localObject9 = localObject8[2][0];
              }
              if (!bool)
              {
                if (!localObject9.isEmpty())
                {
                  localObject10 = localObject8[1][1];
                  d7 = d6 - d2;
                  if (!localObject10.isEmpty()) {
                    d7 = d6 - this.e.r(localObject10.m()).b;
                  }
                  d8 = d7 / localObject9.size();
                  d9 = d6 - d7 + 0.5D * d8;
                  do
                  {
                    if (localObject9.isEmpty()) {
                      break;
                    }
                    locald4 = (a.c.d)localObject9.e();
                    localz5 = this.e.o(locald4);
                    localw5 = (a.d.w)localz5.b();
                    localz5.c(new a.d.w(localw5.a, d9));
                    localz5.c(new a.d.w(d1, d9));
                    a(locald4, localz5);
                    localObject10.b(locald4);
                    d9 += d8;
                    if (bool) {
                      break label3964;
                    }
                    if (i11 != 0) {
                      break label3954;
                    }
                  } while (i11 == 0);
                }
                if (bool) {}
              }
              else
              {
                localObject9 = localObject8[2][2];
              }
              if ((bool) || (!localObject9.isEmpty()))
              {
                localObject10 = localObject8[3][1];
                d7 = d6 - d2;
                if (!localObject10.isEmpty()) {
                  d7 = d6 - this.e.r(localObject10.n()).b;
                }
                d8 = d7 / localObject9.size();
                d9 = d6 - d7 + 0.5D * d8;
                do
                {
                  if (localObject9.isEmpty()) {
                    break;
                  }
                  locald4 = (a.c.d)localObject9.b();
                  localz5 = this.e.o(locald4);
                  localw5 = (a.d.w)localz5.b();
                  localz5.c(new a.d.w(localw5.a, d9));
                  localz5.c(new a.d.w(d4, d9));
                  a(locald4, localz5);
                  localObject10.b(locald4);
                  d9 += d8;
                  if (bool) {
                    break label4163;
                  }
                  if (i11 != 0) {
                    break label4161;
                  }
                } while (i11 == 0);
              }
            } while (bool);
            ((a.c.w)localObject4).f();
          } while (i11 == 0);
        }
      }
      if (bool) {
        break label4197;
      }
      this.e.a((x)localObject1);
      if (this.t == null) {
        return;
      }
    }
    label1304:
    label1498:
    label2142:
    label2146:
    label2149:
    this.h.a().a(this.t);
    label2124:
    label2914:
    label4197:
    this.t = null;
    label2231:
    label2248:
    label3538:
    label3548:
    label4193:
    return;
  }
  
  void a(a.c.d paramd, z paramz)
  {
    this.e.a(paramd, paramz);
    paramd = this.f.b(paramd);
    paramz.j();
    this.e.a(paramd, paramz);
  }
  
  private int a(z paramz1, z paramz2, int paramInt1, int paramInt2)
  {
    z localz = new z();
    localz.addAll(paramz1);
    localz.addAll(paramz2);
    if (!v)
    {
      if (localz.size() == 0) {
        return (paramInt2 + paramInt1) / 2;
      }
      localz.k();
    }
    return a(localz);
  }
  
  private int a(z paramz1, z paramz2, int paramInt1, int paramInt2, int paramInt3)
  {
    boolean bool = v;
    if (!bool) {
      if (paramInt3 >= paramInt2 - paramInt1) {
        return paramInt1 + paramInt3 / 2;
      }
    }
    int i1 = a(paramz1, paramz2, paramInt1, paramInt2);
    if (!bool)
    {
      if (i1 - paramInt3 / 2 < paramInt1)
      {
        i1 = paramInt1 + paramInt3 / 2;
        if (bool) {
          break label100;
        }
        if (u == 0) {}
      }
      else
      {
        if (bool) {
          break label100;
        }
      }
    }
    else if (i1 + paramInt3 / 2 > paramInt2) {
      i1 = paramInt2 - paramInt3 / 2;
    }
    label100:
    return i1;
  }
  
  private int a(z paramz)
  {
    boolean bool = v;
    int i2 = u;
    paramz.a(new a_());
    y localy = paramz.h();
    int i1 = 0;
    if (i1 < paramz.size() / 2) {}
    while (bool)
    {
      if (i2 != 0) {
        break label69;
      }
      localy.f();
      i1++;
      if (i2 == 0) {
        break;
      }
    }
    label69:
    return ((Integer)localy.j()).intValue();
  }
  
  class b_
    implements Comparator
  {
    a.c.q a;
    int c;
    
    b_() {}
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      boolean bool = a.v;
      int j = a.u;
      a.d.w localw1 = a.this.e.r((a.c.d)paramObject1);
      a.d.w localw2 = a.this.e.r((a.c.d)paramObject2);
      int i = 0;
      if (!bool) {
        switch (this.c)
        {
        case 0: 
          i = l.a(localw1.a, localw2.a);
          if (!bool) {
            if (j == 0) {
              break;
            }
          }
          break;
        case 3: 
          i = l.a(localw1.b, localw2.b);
          if (!bool) {
            if (j == 0) {
              break;
            }
          }
          break;
        case 2: 
          i = l.a(localw2.a, localw1.a);
          if (!bool) {
            if (j == 0) {
              break;
            }
          }
          break;
        case 1: 
          i = l.a(localw2.b, localw1.b);
        }
      }
      return i;
    }
  }
  
  static class c_
    extends a.i.p
  {
    a.f.j.p c;
    x d;
    
    c_(a.f.j.p paramp, x paramx)
    {
      this.c = paramp;
      this.d = paramx;
    }
    
    public Object get(Object paramObject)
    {
      boolean bool = a.v;
      if (!bool) {
        if ((paramObject instanceof a.f.j.n)) {
          return this.c.get(paramObject);
        }
      }
      if ((bool) || ((paramObject instanceof e))) {
        return this.d.get(paramObject);
      }
      throw new IllegalStateException("Illegal Type " + paramObject);
    }
  }
  
  class a_
    implements Comparator
  {
    a_() {}
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      Integer localInteger1 = (Integer)paramObject1;
      Integer localInteger2 = (Integer)paramObject2;
      return l.a(localInteger1.intValue(), localInteger2.intValue());
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.h.e.a

 * JD-Core Version:    0.7.0.1

 */